package com.itheima.pingda.controller;

import com.itheima.pinda.authority.base.R;

import com.itheima.pinda.authority.dozer.DozerUtils;
import com.itheima.pinda.authority.dto.auth.VueRouter;
import com.itheima.pinda.authority.entity.auth.Menu;
import com.itheima.pinda.authority.entity.auth.User;
import com.itheima.pinda.authority.utils.TreeUtil;
import com.itheima.pingda.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

import static com.itheima.pinda.authority.base.R.success;

@RequestMapping("/authority/anno")
@RestController
public class LoginController {

    @PostMapping("/login")
    public Result login(User user){
        user.setAccount("pingda");
        user.setName("管理员");
        user.setPassword("123123");/*
        String s=;
        JSONObject object = JSONObject.parseObject(s);*/
        Result result=new Result(true,"asdasdas","0000",user);
        System.out.println(result);
        return result;
    }

}
